package com.zh.javaguide.classloader;

/**
 * Copyright (C) 广州中和互联网技术有限公司
 * 类加载器：
 * @author 范家微 fanjiawei@borche.cn
 * @date :2021/1/26 21:56
 */
public class ClassLoaderDemo {

	public static void main(String[] args) {
		//当前类加载器sun.misc.Launcher$AppClassLoader@18b4aac2
		System.out.println("当前类加载器"+ClassLoaderDemo.class.getClassLoader());
		//父类加载器:sun.misc.Launcher$ExtClassLoader@65b3120a
		System.out.println("父类加载器:"+ClassLoaderDemo.class.getClassLoader().getParent());
		//爷爷类加载器:null null代表Bootstrap ClassLoader
		System.out.println("爷爷类加载器:"+ClassLoaderDemo.class.getClassLoader().getParent().getParent());
	}
}
